namespace YM{
    export abstract class IDestroySystem{
        getType(){
            return (<any>this).__proto__.constructor;
        }
        abstract run(o);
    }
    export abstract  class DestroySystem<T> extends IDestroySystem{
        run(o):void{
            this.destroy(o);
        }
        abstract  destroy(self:T):void;
    }
}